print("123")
function newpoly(polynomial)
  return function (x)
    local p = 0
    for i=1,#polynomial do
      p = p + polynomial[i]*x^(#polynomial-i)
    end
    return p
  end
end
f = newpoly({3,0,1})
print(f(10))